package main

import (
	"Gin-Vue/dao"
	"Gin-Vue/model"
	"Gin-Vue/router"
)

func main() {
	err := dao.InitMySql()
	if err != nil {
		panic(err)
	}

	defer dao.DB.Close()

	dao.DB.AutoMigrate(&model.Todo{})

	r := router.SetupRouter()

	r.Run(":9000")
}
